package org.tis.tools.abf.module.sys.entity.vo;

import lombok.Data;
import org.tis.tools.abf.module.sys.entity.SysDict;
import org.tis.tools.abf.module.sys.entity.enums.DictFromType;
import org.tis.tools.abf.module.sys.entity.enums.DictType;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by chenchao
 * Created on 2018/5/31 14:48
 */
@Data
public class SysDictDetail implements Serializable{

    /** serialVersionUID */
    private static final long serialVersionUID = 1L;

    private String guid = "";

    private String dictKey ="";

    private String dictName ="";

    private DictType dictType = null;

    private DictFromType fromType = null;

    private String sendValue = "";

    private String dictDesc = "";

    private List<Object> children = new ArrayList<>();

    public SysDictDetail(){}

    public SysDictDetail(SysDict sysDict){
        this.guid = sysDict.getGuid();
        this.dictKey = sysDict.getDictKey();
        this.dictName = sysDict.getDictName();
        this.dictType = sysDict.getDictType();
        this.fromType = sysDict.getFromType();
        this.sendValue = sysDict.getSendValue();
        this.dictDesc = sysDict.getDictDesc();
    }

    public SysDictDetail(SysDict sysDict, List<Object> children){
        this.guid = sysDict.getGuid();
        this.dictKey = sysDict.getDictKey();
        this.dictName = sysDict.getDictName();
        this.dictType = sysDict.getDictType();
        this.fromType = sysDict.getFromType();
        this.sendValue = sysDict.getSendValue();
        this.dictDesc = sysDict.getDictDesc();
        this.children = children;
    }

}
